{include file="public/tpl/head.html" /}
<body>
    <!--导航头部-->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="javascript:void(0);" title="{$prj.pro_name}">{$prj.pro_code}</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/TeCenter/">首页</a></li>
            <li><a href="JavaScript:void(0);" url="/TeCenter/index/project/paction/list.html" id="paction_btn">新建项目</a></li>
            <li><a href="{$prj.oldVersion}" target="_blank">旧版</a></li>
          </ul>
          <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="Search...">
          </form>
        </div>
      </div>
    </nav><!--导航头部-->
    <!--左边按钮-->
    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          <ul class="nav nav-sidebar" id="hashForMap">
            <li class="active"><a href="#about">简介</a></li>
            {if condition="isset($dev.count)"}<li role="presentation"><a href="#developer">开发者 <span class="badge">{$dev.count}</span></a></li>{/if}
            {if condition="isset($tree.count)"}<li role="presentation"><a href="#trees">结构树 <span class="badge">{$tree.count}</span></a></li>{/if}
            {if condition="isset($log.count)"}<li role="presentation"><a href="#logs">日志表 <span class="badge">{$log.count}</span></a></li>{/if}
          </ul>
        </div>
      </div>

    <!--页面容器-->
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <div id="about" class="mapToHash"><!--项目简介-->
          <h1 class="page-header" id="prj-name">{$prj.pro_name}</h1>
          <div class="well">
            <h4><span class="label label-primary">环境</span></h4>
            <div>
              {$prj.environment}
            </div>
            <h4><span class="label label-success">简介</span></h4>
            <div>
              {$prj.descrip}
            </div>
            <h3><span class="label label-info">内容</span></h3>
            <div>
              {$prj.content}
            </div>
            {if condition="isset($prj.pro_name) && $dev.isFounder == 'Y'"}
              <p>
                <a href="JavaScript:void(0);" id="prj_edit_btn" url="/TeCenter/index/project/paction/list.html?uid={$prj.pro_code}">修改</a>
                <a href="JavaScript:void(0);" id="prj_delete_btn">删除</a>
              </p>
            {/if}
          </div>
        </div>

        <div id="developer" class="mapToHash"><!--开发者-->
          <h1 class="page-header">开发者列表</h1>
          <div>
              <table class="table">
              <thead>
                <tr>
                  <th>#</th><th>姓名</th><th>职称</th><th>加入日期</th><th>编辑者</th><th>操作</th>
                </tr>
              </thead>
              <tbody>
                {$dev.trs}
              </tbody>
            </table>
            <p>
              <button type="button" class="btn btn-xs btn-primary" onclick="TeC.MainTo('{$dev.formurl|default=""}')">新增</button>
            </p>
          </div>
        </div>

        <div id="trees" class="mapToHash"><!--开发者-->
          <h1 class="page-header">项目结构树</h1>
          <div class="well">
            {if condition="isset($tree.content)"} {$tree.content}
            {else /} 
              <div class="alert alert-warning" role="alert">
                <strong>遗憾!</strong> 可能你的项目还没有任何分支
              </div>
            {/if}
            <p>
              <button type="button" class="btn btn-xs btn-success" onclick="TeC.MainTo('{$tree.formurl|default=""}')">新增</button>
            </p>
          </div>
        </div>

        <div id="logs" class="mapToHash"><!--开发者-->
          <h1 class="page-header">项目日志</h1>
          <div class="well" id="logs_content">
            {if condition="isset($log.content)"} {$log.content}
            {else /} 
              <div class="alert alert-warning" role="alert">
                <strong>遗憾!</strong> 没有发现有关项目的任何项目日志
              </div>
            {/if}
            <p>
              <button type="button" class="btn btn-xs btn-info"  onclick="TeC.MainTo('{$log.formurl|default=""}')">新增</button>
            </p>
          </div>
        </div>

        <div id="prj_action"><!--表单处理-->
        </div>
    </div><!--页面容器-->
</body>
</html>